﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SalesOneWeb.Master" AutoEventWireup="true" CodeBehind="AddUnit.aspx.cs" Inherits="IronOne.SalesOne.SalesOneWeb.Structure.AddUnit" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">


 <script language="javascript" type="text/javascript">

     window.onload = function() {

         var msg = document.getElementById('ctl00_MasterMsg');
         if (msg && msg.innerHTML != '')
             showMessageBlock();
     }

</script>



  <link href="../StyleSheets/salesOne_txtstyle.css" rel="stylesheet" type="text/css" />
    
    
   
    
   
    
    
   
    
    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table id="data" border="0" class="detailstable">
    
                    <tr>
                        <td align="left" colspan="2">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>

                        </td>
                    </tr>

                    <tr>
                        <td align="left" colspan="2">
                            &nbsp;<asp:Label ID="LblHeader" runat="server" CssClass="ph5"></asp:Label>                        </td>
                    </tr>
                    <tr>
                        <td class="style4">
                            Group 
                            <asp:Label ID="Label1" runat="server" Text="*"></asp:Label>
                            :</td>
                        <td class="style5"  >
                            <asp:DropDownList ID="drpGroup" runat="server" AutoPostBack="True" 
                                onselectedindexchanged="drpGroup_SelectedIndexChanged" CssClass="ddl">
                                <asp:ListItem Value="-1">Select...</asp:ListItem>
                            </asp:DropDownList>
                            <asp:Label ID="lblGroup" runat="server" CssClass="lbl"></asp:Label>
                            <asp:CompareValidator ID="CompareValidator1" runat="server" 
                                ControlToValidate="drpGroup" 
                                ErrorMessage="Required information is missing." Operator="NotEqual" 
                                ValueToCompare="-1">*</asp:CompareValidator>
                        </td>
                    </tr>
                    <tr>
                        <td class="style4">
                            Branch 
                            <asp:Label ID="Label2" runat="server" Text="*"></asp:Label>
&nbsp;:</td>
                        <td class="style5"  >
                            <asp:DropDownList ID="drpBranch" runat="server" AutoPostBack="True" CssClass="ddl">
                                <asp:ListItem Value="-1">Select...</asp:ListItem>
                            </asp:DropDownList>
                            <asp:Label ID="labelBranch" runat="server" CssClass="lbl"></asp:Label>
                            <asp:CompareValidator ID="CompareValidator2" runat="server" 
                                ControlToValidate="drpBranch" ErrorMessage="Required information is missing." 
                                Operator="NotEqual" ValueToCompare="-1">*</asp:CompareValidator>
                        </td>
                    </tr>
                    <tr>
                        <td class="style8">
                            Code 
                            <asp:Label ID="Label3" runat="server" Text="*"></asp:Label>
                            :</td>
                        <td class="style5"  >
                            <asp:TextBox ID="txtCode" runat="server" MaxLength="5" CssClass="txtbox"></asp:TextBox>
                            <asp:Label ID="FieldLblCode" runat="server" CssClass="lbl"></asp:Label>
                            <asp:RequiredFieldValidator ID="CodeValidator" runat="server" 
                                ControlToValidate="txtCode" 
                                ErrorMessage="Required information is missing.">*</asp:RequiredFieldValidator>                        </td>
                    </tr>
                    <tr>
                        <td class="style8">
                            Name 
                            <asp:Label ID="Label4" runat="server" Text="*"></asp:Label>
                            :</td>
                        <td class="style5"  >
                            <asp:TextBox ID="txtName" runat="server" CssClass="txtbox"></asp:TextBox>
                            <asp:Label ID="FieldLblName" runat="server" CssClass="lbl"></asp:Label>
                            <asp:RequiredFieldValidator ID="NameValidator" runat="server" 
                                ControlToValidate="txtName" 
                                ErrorMessage="Required information is missing.">*</asp:RequiredFieldValidator>                        </td>
                    </tr>
                    <tr>
                        <td class="style8">
                            Effective From 
                            <asp:Label ID="Label5" runat="server" Text="*"></asp:Label>
                            :</td>
                        <td class="style5"  >
                            <asp:TextBox ID="txtEffectiveFrom" runat="server" CssClass="txtbox"></asp:TextBox>                        
                            <asp:Label ID="FieldLblFrom" runat="server" CssClass="lbl"></asp:Label>
                            <asp:Image ID="Image1" runat="server" ImageUrl="~/images/calander.jpg" />
                            <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtEffectiveFrom" PopupButtonID="Image1" Format="dd/MM/yyyy">
                            </cc1:CalendarExtender>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                ControlToValidate="txtEffectiveFrom" 
                                ErrorMessage="Required information is missing.">*</asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                ControlToValidate="txtEffectiveFrom" 
                                ValidationExpression="^([1-9]|0[1-9]|[12][0-9]|3[01])[/.]([1-9]|0[1-9]|1[012])[/.][0-9]{4}$">*</asp:RegularExpressionValidator>
                        </td>
                    </tr>
                    <tr>
                        <td class="style8">
                            Effective To 
                            <asp:Label ID="Label6" runat="server" Text="*"></asp:Label>
                            :</td>
                        <td class="style5"  >
                            <asp:TextBox ID="txtEffectiveTo" runat="server" CssClass="txtbox"></asp:TextBox>                        
                            <asp:Label ID="FieldLblTo" runat="server" CssClass="lbl"></asp:Label>
                            <asp:Image ID="Image2" runat="server" ImageUrl="~/images/calander.jpg" />
                            <cc1:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtEffectiveTo" PopupButtonID="Image2" Format="dd/MM/yyyy">
                            </cc1:CalendarExtender>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                ControlToValidate="txtEffectiveTo" 
                                ErrorMessage="Required information is missing.">*</asp:RequiredFieldValidator>
                            <asp:CompareValidator ID="CompareValidator" runat="server" 
                                ControlToCompare="txtEffectiveTo" ControlToValidate="txtEffectiveFrom" 
                                ErrorMessage="Effective To date must be greater than Effective From date." 
                                Operator="LessThan" Type="Date">*</asp:CompareValidator>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                                ControlToValidate="txtEffectiveTo" 
                                ValidationExpression="^([1-9]|0[1-9]|[12][0-9]|3[01])[/.]([1-9]|0[1-9]|1[012])[/.][0-9]{4}$">*</asp:RegularExpressionValidator>
                        </td>
                    </tr>
                    <tr>
                        <td align="center" colspan="2" class="pix8">
                            </td>
                    </tr>
                    
                    
                    <tr>
                        <td align="left" style="color:Red;" class="style2" colspan="2">
                            <table cellpadding="0" cellspacing="0" class="style6">
                                <tr>
                                    <td >
                                        
                            <asp:Button ID="BtnDone" runat="server" Text="Done" Height="23px" 
                                        onclick="BtnDone_Click" OnClientClick="validationSummery();" 
                                        CssClass="btn" />
                                        
                                    </td>
                                    <td>
                                        
                                    <asp:Button ID="btnCancel" runat="server" CausesValidation="False" 
                            onclick="btnCancel_Click" Text="Cancel" CssClass="btn" Height="23px" Width="76px"/>
                                        
                                    </td>
                                </tr>
                            </table>
                            
                        </td>
                    </tr>
                </table>
</asp:Content>
